package cn.haohaowo.service;

import cn.haohaowo.dao.OrderDao;
import cn.haohaowo.entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by luwancai on 18/5/19.
 * DESC:
 */
@Service
public class OrderService {

    @Autowired
    private OrderDao orderDao;

    public List<Order> queryOrders(int accountId, int minRow, int pageSize) {
        return orderDao.getOrders(accountId, minRow, pageSize);
    }

    public Order queryOrdersById(int orderId) {

        return null;
    }

    public void saveOrder(Order order) {
        orderDao.insertOrder(order);
    }
}
